From 59e3371cda4ba7f1444fb1951f30c03a210fa029 Mon Sep 17 00:00:00 2001 From: Claudio Cambra Date: Wed, 19 Mar 2025 18:57:10 +0100 Subject: [PATCH] gui/macOS: Do not assume accountState will always be valid When removing an account this can change Signed-off-by: Claudio Cambra --- src/gui/macOS/fileprovidersocketcontroller.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/gui/macOS/fileprovidersocketcontroller.cpp b/src/gui/macOS/fileprovidersocketcontroller.cpp index 1f9bd202b..afe69acbf 100644 --- a/src/gui/macOS/fileprovidersocketcontroller.cpp +++ b/src/gui/macOS/fileprovidersocketcontroller.cpp @@ -206,7 +206,10 @@ void FileProviderSocketController::sendNotAuthenticated() const void FileProviderSocketController::sendAccountDetails() const { - Q_ASSERT(_accountState); + if (!_accountState) { + qCWarning(lcFileProviderSocketController) << "No account state available to send account details, stopping"; + return; + } const auto account = _accountState->account(); Q_ASSERT(account); -- 2.30.2